package com.yjd.bi.report.service;

import java.util.List;

import com.yjd.bi.report.model.BiDataChangeRecordModel;
import com.yjd.comm.base.enums.DbWREnums;
import com.yjd.comm.base.service.IBaseService;

/**
 * <b>description</b>：数据变更记录业务接口<br>
 * <b>time</b>：2016-04-08 15:29:55 <br>
 * <b>author</b>： ready likun_557@163.com
 */
public interface IBiDataChangeRecordService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public BiDataChangeRecordModel insert(BiDataChangeRecordModel model)
			throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(BiDataChangeRecordModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param id
	 * @return
	 * @throws Exception
	 */
	public int delete(long id) throws Exception;

	/**
	 * 判断数据是否存在
	 * 
	 * @param database_info_id
	 * @param data_change_record_id
	 * @param dbw
	 * @return
	 * @throws Exception
	 */
	public boolean isExists(long database_info_id, long data_change_record_id,
			DbWREnums dbw) throws Exception;

	/**
	 * 将ids的数据移到日志表
	 * 
	 * @param ids
	 * @throws Exception
	 */
	public void moveDataToDataLog(List<Long> ids) throws Exception;

	/**
	 * 将id的数据移到日志表
	 * 
	 * @param id
	 * @param isJcNotLastRow
	 *            是否需要检查不是是最后一条
	 * @throws Exception
	 */
	public void moveDataToDataLog1(Long id, boolean isJcNotLastRow)
			throws Exception;
}
